import { getCommonProblemType } from "../../api/index";
import { tntInstId, scene } from "../../setting";

Page({
  data: {
    tntInstId,
    scene,
    qList: [
      { title: '订单如何退款？' }
    ]
  },
  toDetail(e) {
    const id = e.currentTarget.dataset.id;
    my.navigateTo({
      url: '../question/question?id=' + id
    });
  },
  getData() {
    getCommonProblemType().then(res => {
      my.stopPullDownRefresh();
      this.setData({
        qList: res || []
      })
    })
  },
  onLoad() {
    this.getData();
  },
  onPullDownRefresh() {
    this.getData();
  }
});
